//
//  UIViewController+HMSliderMenu.m
//  02-QQ-代码
//
//  Created by HaoYoson on 16/7/11.
//  Copyright © 2016年 HaoYoson. All rights reserved.
//

#import "UIViewController+HMSliderMenu.h"

@implementation UIViewController (sliderController)

- (QQSliderMenuViewController *)sliderMenuController {
    UIViewController *iter = self.parentViewController;
    while (iter) {
        if ([iter isKindOfClass:[QQSliderMenuViewController class]]) {
            return (QQSliderMenuViewController *)iter;
        } else if (iter.parentViewController && iter.parentViewController != iter) {
            iter = iter.parentViewController;
        } else {
            iter = nil;
        }
    }
    return nil;
}

@end
